<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>个人中心</title>
<meta name="keywords" content=""/>
<meta name="description" content=""/>
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
<meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport" />
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="format-detection" content="telephone=no"/>
<link rel="stylesheet" href="__STATIC__/css/common.css">
<link rel="stylesheet" href="__STATIC__/css/friend.css">
<script>
    window.onload = window.onresize =function(){
    	document.documentElement.style.fontSize = 100/750*document.documentElement.clientWidth + "px";
    }    
</script>
</head>
<body>
	<div class="warp">
		<div class="head">
			我的合伙人<span>(5)</span>
		</div>
		<ul class="friend-list">
		</ul>
	</div>
	<ul class="foot">
		<li class="buy"><a href="{:url('index/buycode')}">购买房卡</a></li>
		<li><a href="{:url('index/code')}">我的邀请码</a></li>
		<li><a href="{:url('index/index')}">个人中心</a></li>
		<li><a href="{:url('index/friend')}">我的合伙人</a></li>
		<li><a href="{:url('index/get')}">奖励中心</a></li>
	</ul>

	<script src="__STATIC__/js/jquery-2.1.4.min.js"></script>
	<script src="__STATIC__/js/swiper-4.2.2.min.js"></script>
	<script>
		$.ajax({
		  url: '{:url("index/is_login")}',
		  type: 'post',
		  dataType: 'json',
		  // timeout: 1000,
		  success: function (data) {
		    if(data.code == 0){
		    	window.location.href = 'http://client.rup-china.com/yxzf/index.php/index/index/wechatLogin';
		    }
		  },
		  fail: function (err) {
		    console.log(err)
		  }
		}) 

		//加载合伙人
		var str = ""
		$.post('http://client.rup-china.com/yxzf/index.php/index/index/see_qrcode',function(result){
			console.log(result)
			var len_ = result.collaborator_info.length
			$('.head span').text('('+len_+')')
			$.each(result.collaborator_info,function(i,e){  
				str = "<li>\
						<div class='headimg'>\
							<img src='"+e.headimgurl+"' />\
						</div>\
						<div class='name'>"+e.nickname+"</div>\
						<div class='num'>￥"+e.money+"</div>\
					</li>"
				$('.friend-list').append(str)
			})
			console.log(str);
			

		})
	</script>

</body>
</html>